import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [{
    path: '/',
    name: 'index',
    component: () => import('../layout/index.vue'),
    children: [
      {
        path: '/log',
        name: 'log',
        component: () => import('../views/log/index.vue')
      },
      {
        path: '/menu',
        name: 'menu',
        component: () => import('../views/menu/index.vue')
      },
      {
        path: '/dict',
        name: 'dict',
        component: () => import('../views/dict/dict.vue')
      },
      {
        path: '/user',
        name: 'user',
        component: () => import('../views/user/user.vue')
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router